
import { useData } from '@sker/runtime'
import { toFail, toSuccess } from '@sker/core'
import { z } from 'zod'
/**
 * 应用更新升级
 */
export default async () => {
    const input = z.object({
        version: z.string()
    })
    const body = input.parse(useData())
    if (body.version === `3.2.1`) {
        const downloadUrl = `http://60.204.248.43:8888/down/wzQVNMJY9Cmc.zip`
        const filename = `autox`
        // downloadUrl, filename
        return toSuccess({ downloadUrl, filename })
    }
    return toFail(`已经最新了`)
}